<?php
/**
 * @version		1.0.0
 * @category	Anahita Social Simple Blogs
 * @copyright	Copyright (C) 2008 - 2010 rmdStudio Inc. and Peerglobe Technology Inc. All rights reserved.
 * @license		GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
 * @link     	http://www.anahitapolis.com
 */

/**
 * Simple Blog Applicaiton Model
 *
 */
class ComQuestionsModelApplication extends AnSeApplication
{
	/**
	 * Callback called before an actor profile is rendered
	 * 
	 * @param  KCommandContext $context
	 * @return void
	 */
	public function onProfileDisplay(KCommandContext $context)
	{
		$actor   = $context->actor;
		$actions = $context->actions;
		$gadgets = $context->gadgets;
		
		if ( $actor->getAcl()->allowView('com_questions:questions') )
			$gadgets->add(array(
				'id'  			=> 'questions-actor-profile',
				'title' 		=> 'Questions',
				'title_url' 	=> JRoute::_('index.php?option=com_questions&view=questions&oid='.$actor->id),
				'url'   		=> JRoute::_('index.php?option=com_questions&view=questions&layout=profile&oid='.$actor->id)				
			));
	}

	/**
	 * Callback called before the dashboard is rendered
	 * 
	 * @param  KCommandContext $context
	 * @return void
	 */	
	public function onDashboardDisplay(KCommandContext $context)
	{
		$actor   = $context->actor;
		$actions = $context->actions;
		$gadgets = $context->gadgets;
		
		//print_r($gadgets);
		//echo "got here!";	
	}
	
	/**
	 * Load Story Template is a called by Social Engine to load the Blog story template
	 * 
	 * @return void
	 */
	protected function _loadStoryTemplates()
	{

	}	
}